package fpzhan.plane.program.param;

import fpzhan.plane.program.function.CodeBlockFunction;
import fpzhan.plane.program.function.RemoveKeysEmptyException;

public final class RemoveParamTool {

    private String [] removes;

    public RemoveParamTool(String... removes) throws RemoveKeysEmptyException {
        if (removes==null || removes.length==0)throw new RemoveKeysEmptyException();
        this.removes = removes;
    }

    public String[] getRemoves() {
        return removes;
    }

    public CodeBlockFunction remove(){
        return param -> {
            param.remove(removes);
        };
    }
}
